home *** CD-ROM | disk | FTP | other *** search
- Tutorial eKH CrackMe 1.0
-
- By
-
- Sanhedrin
-
- Date: 13 March 1999
- Email: Stachi@geocities.com
- Tools: Softice 3.24
-
-
- This crackme asks the user to supply their name and serial. An error message
- 'Wrong Serial Number!' is given if the number is incorrect.
-
- I always start cracking using hmemcpy. This gets me into the code 95% of the
- time, and enables me to see right away what kind of code I am looking at
- (ie. VB or C, or some other).
-
- So....
-
- Enter your name and serial number:
-
- I used.... Sanhedrin
- 12344321
-
- go into softice and enter the breakpoint
-
- bpx hmemcpy
-
- exit softice and press on OK
-
- This will break into softice. Disable the breakpoint by typing bd * .
- Press F12 several times (it took me 12 times), until you reach the code:
-
- :00427B65 E826E2FEFF call 00415D90
- :00427B6A 8B45FC mov eax, dword ptr [ebp-04]<------you will end up here;
- :00427B6D E83EBCFDFF call 004037B0
- :00427B72 48 dec eax
- :00427B73 7C30 jl 00427BA5
- :00427B75 8D55FC lea edx, dword ptr [ebp-04]
- :00427B78 8B83EC010000 mov eax, dword ptr [ebx+000001EC]
-
- CALL 00415D90
-
- Press F10 once, then type
-
- d eax
-
- You should see your name in the data window.
-
- Press F10 several more times until you are at
-
-
- :00427B7E E80DE2FEFF call 00415D90
- :00427B83 8B45FC mov eax, dword ptr [ebp-04]
- :00427B86 50 push eax
- :00427B87 8D55F8 lea edx, dword ptr [ebp-08]
- :00427B8A 8B83DC010000 mov eax, dword ptr [ebx+000001DC]
- :00427B90 E8FBE1FEFF call 00415D90
- :00427B95 8B45F8 mov eax, dword ptr [ebp-08]
- :00427B98 5A pop edx
- :00427B99 E882FEFFFF call 00427A20
- :00427B9E 3D4E61BC00 cmp eax, 00BC614E<-----stop here
- :00427BA3 7D1E jge 00427BC3
-
- POP EDX
-
- At this point type
-
- d edx
-
- In the data window you should see:
-
- A. Your name;
- B. Your entered serial number; and
- C. The actual serial number.
-
- In my case
-
- A. Sanhedrin
- B. 12344321
- C. 4NNN54YN5A
-
-
- So what happened?
-
- If you delve a little more into the code, and put a break point on the call at
-
- 00427A20 (type bpx 00427A20),
-
- you will notice that your name is checked, changed into a code, then compared at:
-
-
- :00427ABE 8BC3 mov eax, ebx
- :00427AC0 B90A000000 mov ecx, 0000000A
- :00427AC5 99 cdq
- :00427AC6 F7F9 idiv ecx
- :00427AC8 62153C7B4200 bound edx, dword ptr [00427B3C]
- :00427ACE 8A9284884200 mov dl, byte ptr [edx+00428884]
- :00427AD4 8D45F0 lea eax, dword ptr [ebp-10]
- :00427AD7 E8FCBBFDFF call 004036D8
- :00427ADC 8B55F0 mov edx, dword ptr [ebp-10]
- :00427ADF 8D45F4 lea eax, dword ptr [ebp-0C]
- :00427AE2 E8D1BCFDFF call 004037B8
- :00427AE7 8BC3 mov eax, ebx
- :00427AE9 B90A000000 mov ecx, 0000000A
- :00427AEE 99 cdq
- :00427AEF F7F9 idiv ecx
- :00427AF1 8BD8 mov ebx, eax
- :00427AF3 4E dec esi
- :00427AF4 75C8 jne 00427ABE
- :00427ABE 8BC3
-
-
- If you do a memory dump at:
-
- 00B96368 (d 00B96368)
-
- and watch the data window, you will see the actual code appear before your eyes.
-
-
-
- Notes
-
- This is my first public tutorial, and I am far from an expert. If I have made any errors,
- or have not explained myself clearly, email me at the address above.
-
-
- My thanks go to all of the people who make these CrackMes, and to
- The Sandman for taking the time to set up a web page encouraging all of us to
- better our skills.
-
- Sanhedrin
-